﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml;

namespace Helpers
{
    public class XmlHelper
    {
        protected string strXmlFile;
        protected XmlDocument objXmlDoc = new XmlDocument();

        public XmlHelper(string xmlFilePath)
        {
            if (!File.Exists(xmlFilePath))
                ExceptionHelper.Throw("文件不存在");
            objXmlDoc.Load(xmlFilePath);
        }

        public XmlNode SelectSingleNode(string xpath)
        {
            return objXmlDoc.SelectSingleNode(xpath);
        }
    }
}
